#include "SQLRevokeStatement.h"

#include "../../../DbType.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../../../utils/listTran.h"

SQLRevokeStatement::SQLRevokeStatement()
{
}

SQLRevokeStatement::SQLRevokeStatement(DbType_ptr   dbType) 
: SQLPrivilegeStatement(dbType)
{
}

void SQLRevokeStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLRevokeStatement)))
  {
    acceptChild(visitor, resource);
    SQLObject_list_ptr  tmp = ListTran::tran_class<SQLExpr, SQLObject>(users);
    acceptChild(visitor, tmp);
  }
  visitor->endVisit(SharedObject(SQLRevokeStatement));
}

BOOL_ptr SQLRevokeStatement::isGrantOption()
{
  return grantOption;
}

void SQLRevokeStatement::setGrantOption(BOOL_ptr grantOption)
{
  this->grantOption = grantOption;
}
